#!/usr/bin/php -q
<?php

$message = "";
$stdin = fopen('php://stdin', 'r');
while($line = fgets($stdin)) {
    $message .= "$line";
}
fclose($stdin);

if (($fd= fopen("/var/www/html/logs/access.log", "a"))) {
    fwrite($fd, "$message\n\n\-------------------n");
    fclose($fd);
}
